﻿
SET QUOTED_IDENTIFIER ON
GO

SET ANSI_NULLS ON
GO

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_WA_AddPositionDutyTime]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_WA_AddPositionDutyTime];
GO
CREATE PROCEDURE [dbo].[sproc_WA_AddPositionDutyTime]
	@PositionID int,
	@OnDutyTime datetime,
	@OffDutyTime datetime
AS
BEGIN
SET NOCOUNT ON

INSERT INTO dbo.UDS_WorkAttendence_DutyTime(ID, IDType, OnDutyTime, OffDutyTime)
VALUES(@PositionID, N'Position', @OnDutyTime, @OffDutyTime);

RETURN @@error;

END
GO